package com.moco.launcher.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;

import com.moco.launcher.R;
import com.moco.launcher.activity.PopActivity;

public class KeyFragment extends BaseFragment {
	private static final String TAG = "KeyFragment";
	
	private Button mBtnVoice = null;
	private Button mBtnVolum = null;
	private Button mBtnAdr = null;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		View rootView = inflater.inflate(R.layout.keytest_layout, container, false);
		mBtnVoice = (Button)rootView.findViewById(R.id.voice);
		mBtnVoice.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(KeyFragment.this.getContext(), VoiceFragment.class);
				intent.putExtra("fragment_type", "voice");
				startActivity(intent);
			}
		});

		mBtnVolum = (Button) rootView.findViewById(R.id.volume);
		mBtnVolum.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(KeyFragment.this.getContext(), VolumeFragment.class);
				intent.putExtra("fragment_type", "volume");
				startActivity(intent);
			}
		});

		mBtnAdr = (Button) rootView.findViewById(R.id.adr_window);
		mBtnAdr.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(KeyFragment.this.getContext(), PopActivity.class);
				intent.putExtra("fragment_type", "adr");
				startActivity(intent);
			}
		});

		return rootView;
	}
}
